package com.gm.cards.domain;

public enum Number {
    AS(1, 8), TWO(2, 9), THREE(3, 10), FOUR(4, 1), FIVE(5, 2), SIX(6, 3), SEVEN(7, 4), QUEEN(8, 5), JACK(9, 6), KING(10, 7);

    private int position;

    private int defaultWeight;

    private Number(int position, int defaultWeight) {
	this.position = position;
	this.defaultWeight = defaultWeight;
    }

    public int getPosition() {
	return this.position;
    }

    public int getDefaultWeight() {
	return this.defaultWeight;
    }

    public static Number valueOf(int value) {
	switch (value) {
	case 1:
	    return AS;
	case 2:
	    return TWO;
	case 3:
	    return THREE;
	case 4:
	    return FOUR;
	case 5:
	    return FIVE;
	case 6:
	    return SIX;
	case 7:
	    return SEVEN;
	case 8:
	    return QUEEN;
	case 9:
	    return JACK;
	case 10:
	    return KING;
	default:
	    return null;
	}
    }
}
